class WorkComment < ActiveRecord::Base
  belongs_to :user
  belongs_to :work, :counter_cache => true
  validates_presence_of :content, :user, :work, :message => "不能为空"
  
  def authorized?(user)
    work.user == user
  end
end
